<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('scene list')" />
	<th:block th:include="include :: layout-latest-css" />
	<th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="form">
					<div class="select-list">
						<ul>
							<li class="select-time">
								<label>考核日期： </label>
								<input type="text" class="" id="dayId" name="dayId" th:value="${scene.dayId}"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								&nbsp;&nbsp;
							</li>
						</ul>
					</div>
				</form>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
	
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: layout-latest-js" />
	<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: datetimepicker-js" />
	<script th:inline="javascript">
		var prefix = ctx + "rate/scene";

		$(function() {
			$("#dayId").datetimepicker({
				format: 'yyyy-mm-dd',
				autoclose: true,
				startView: 2,
				minView: 2
			});
			list();
		});

		function list() {
			var cols = [];
			cols.push({
				checkbox: true
			});
			cols.push({
				field: 'dayId',
				align: 'center',
				title: '考核日期'
			});
			cols.push({
				field: 'createUser.userName',
				align: 'center',
				title: '填报账号'
			});
			cols.push({
				field: 'person1',
				align: 'center',
				title: '上报人员',
				formatter: function(value, row, index) {
					return row.person1 + "、" + row.person2;
				}
			});
			cols.push({
				field: 'cnt',
				align: 'center',
				title: '考核总数'
			});
			cols.push({
				field: 'positiveCnt',
				align: 'center',
				title: '奖励'
			});
			cols.push({
				field: 'negativeCnt',
				align: 'center',
				title: '惩罚'
			});
			
			var options = {
				url: prefix + "/checkList",
				modalName: "scene",
				uniqueId: "id",
				columns: cols
			};
			$.table.init(options);
		}
	</script>
</body>
</html>